﻿

CREATE FUNCTION [dbo].[fs_List_Express]
	(
	@MenuID int
	)
RETURNS TABLE
AS

RETURN (
SELECT
	fs_List_Base_1.LoanID, fs_List_Base_1.MsID, fs_List_Base_1.[First Name] + ' ' + fs_List_Base_1.[Last Name] AS Name,
	fs_List_Base_1.[Date In], DATEDIFF(dd,t_Tracker_Car.DateStamp,GETDATE()) Days,
                      fs_List_Base_1.VIN, fs_List_Base_1.Description, LEFT(fs_List_Base_1.Dealer,20) Dealer, t_Tracker_Car.TrackerID AS Tracker, CONVERT(varchar, 
                      t_Tracker_Car.DateStamp, 111) AS TrDate
FROM         dbo.fs_List_Base(@MenuID) AS fs_List_Base_1 INNER JOIN
                      t_Tracker_Car ON fs_List_Base_1.VIN = t_Tracker_Car.VIN
)




